package com.ruoyi.hotel.service.impl;

import com.ruoyi.hotel.domain.HlState;
import com.ruoyi.hotel.mapper.HlStateMapper;
import com.ruoyi.hotel.service.IHlStateService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import static com.ruoyi.common.enums.stateValue.ID;


/**
 * 状态Service业务层处理
 *
 * @author ruoyi
 * @date 2022-12-10
 */
@Service
public class HlStateServiceImpl implements IHlStateService {


    @Autowired
    private HlStateMapper hlStateMapper;

    /**
     * 查询状态
     *
     * @param id 状态主键
     * @return 状态
     */
    @Override
    public HlState selectHlStateById(Integer id) {
        return hlStateMapper.selectHlStateById(ID);
    }

    /**
     * 修改状态为零
     *
     * @return 结果
     */
    @Override
    public int updateHlStateIsZero() {
        return hlStateMapper.updateHlStateIsZero();
    }

    /**
     * 修改状态为一
     *
     * @return 结果
     */
    @Override
    public int updateHlStateIsOne() {
        return hlStateMapper.updateHlStateIsOne();
    }


}
